package models

import (
	"time"
)

// YhOrderProducts undefined
type OrderProducts struct {
	ID           int64     `json:"id" gorm:"id"`
	OrderId      int64     `json:"order_id" gorm:"order_id"`     // 订单ID
	ProductId    int64     `json:"product_id" gorm:"product_id"` // 产品ID
	UserId       int64     `json:"user_id" gorm:"user_id"`       // 用户ID
	Name         string    `json:"name" gorm:"name"`
	Price        float64   `json:"price" gorm:"price"`
	Image        string    `json:"image" gorm:"image"`
	Num          int64     `json:"num" gorm:"num"`
	SpecType     int64     `json:"spec_type" gorm:"spec_type"`
	SpecInfo     string    `json:"spec_info" gorm:"spec_info"`
	CreatedAt    time.Time `json:"created_at" gorm:"created_at"`         // 创建时间
	UpdatedAt    time.Time `json:"updated_at" gorm:"updated_at"`         // 创建时间
	ProductSkuId int64     `json:"product_sku_id" gorm:"product_sku_id"` // skuID
}

// TableName 表名称
func (*OrderProducts) TableName() string {
	return "dg_order_products"
}